#include "imagebutton.h"

ImageButton::ImageButton()
{

}

//自定义图片按键--重载构造函数--QPushButton的派生类
ImageButton::ImageButton(QString imgName,QString imgPath):imgName(imgName),imgPath(imgPath)
{
    setBaseSize(150,150);
    setMaximumSize(QSize(120,150));
    QPixmap map(imgPath);
    QPixmap newmap = map.scaled(width(),height());
    setIcon(QIcon(newmap));
    setIconSize(newmap.size());
}
